﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using PresentationLayer.Reports;

using System.Web.UI.WebControls;


namespace PresentationLayer.View.Reports
{
    public partial class Report_InventoryStatus : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
          
           int m1 = Int32.Parse(DropDownList1.SelectedValue);

            DS_InventoryStatus ds = new DS_InventoryStatus();
            PresentationLayer.Reports.DS_InventoryStatusTableAdapters.InventoryStatusTableAdapter ta = new PresentationLayer.Reports.DS_InventoryStatusTableAdapters.InventoryStatusTableAdapter();
            ta.Fill(ds.InventoryStatus, m1); 
            PresentationLayer.Reports.Report_InventoryStatus rep = new PresentationLayer.Reports.Report_InventoryStatus();
            rep.SetDataSource(ds);
            CrystalReportViewer4.ReportSource = rep;
           
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string m1 = DropDownList1.SelectedItem.Value;
            Response.Redirect("Print_InventoryStatus.aspx?m1=" + m1);
        }
    }
}